<?php


abstract class BaseContribuintesPeer {

	
	const DATABASE_NAME = 'propel';

	
	const TABLE_NAME = 'contribuintes';

	
	const CLASS_DEFAULT = 'lib.model.Contribuintes';

	
	const NUM_COLUMNS = 26;

	
	const NUM_LAZY_LOAD_COLUMNS = 0;


	
	const ID = 'contribuintes.ID';

	
	const TIPOCONTRIBUINTE_ID = 'contribuintes.TIPOCONTRIBUINTE_ID';

	
	const NOME = 'contribuintes.NOME';

	
	const ENDERECO = 'contribuintes.ENDERECO';

	
	const NUM = 'contribuintes.NUM';

	
	const COMPL = 'contribuintes.COMPL';

	
	const BAIRRO = 'contribuintes.BAIRRO';

	
	const CIDADE_ID = 'contribuintes.CIDADE_ID';

	
	const ESTADO_ID = 'contribuintes.ESTADO_ID';

	
	const CEP = 'contribuintes.CEP';

	
	const TEL_RES = 'contribuintes.TEL_RES';

	
	const TEL_COM = 'contribuintes.TEL_COM';

	
	const TEL_CEL = 'contribuintes.TEL_CEL';

	
	const RG = 'contribuintes.RG';

	
	const CPF = 'contribuintes.CPF';

	
	const EMAIL = 'contribuintes.EMAIL';

	
	const DIA_ID = 'contribuintes.DIA_ID';

	
	const MES_ID = 'contribuintes.MES_ID';

	
	const ANO_ID = 'contribuintes.ANO_ID';

	
	const PROFISSAO_ID = 'contribuintes.PROFISSAO_ID';

	
	const INDICACAO_ID = 'contribuintes.INDICACAO_ID';

	
	const EHCONTRIBUINTE = 'contribuintes.EHCONTRIBUINTE';

	
	const ATIVO = 'contribuintes.ATIVO';

	
	const CREATED_AT = 'contribuintes.CREATED_AT';

	
	const UPDATED_AT = 'contribuintes.UPDATED_AT';

	
	const USUARIO_ID = 'contribuintes.USUARIO_ID';

	
	private static $phpNameMap = null;


	
	private static $fieldNames = array (
		BasePeer::TYPE_PHPNAME => array ('Id', 'TipocontribuinteId', 'Nome', 'Endereco', 'Num', 'Compl', 'Bairro', 'CidadeId', 'EstadoId', 'Cep', 'TelRes', 'TelCom', 'TelCel', 'Rg', 'Cpf', 'Email', 'DiaId', 'MesId', 'AnoId', 'ProfissaoId', 'IndicacaoId', 'Ehcontribuinte', 'Ativo', 'CreatedAt', 'UpdatedAt', 'UsuarioId', ),
		BasePeer::TYPE_COLNAME => array (ContribuintesPeer::ID, ContribuintesPeer::TIPOCONTRIBUINTE_ID, ContribuintesPeer::NOME, ContribuintesPeer::ENDERECO, ContribuintesPeer::NUM, ContribuintesPeer::COMPL, ContribuintesPeer::BAIRRO, ContribuintesPeer::CIDADE_ID, ContribuintesPeer::ESTADO_ID, ContribuintesPeer::CEP, ContribuintesPeer::TEL_RES, ContribuintesPeer::TEL_COM, ContribuintesPeer::TEL_CEL, ContribuintesPeer::RG, ContribuintesPeer::CPF, ContribuintesPeer::EMAIL, ContribuintesPeer::DIA_ID, ContribuintesPeer::MES_ID, ContribuintesPeer::ANO_ID, ContribuintesPeer::PROFISSAO_ID, ContribuintesPeer::INDICACAO_ID, ContribuintesPeer::EHCONTRIBUINTE, ContribuintesPeer::ATIVO, ContribuintesPeer::CREATED_AT, ContribuintesPeer::UPDATED_AT, ContribuintesPeer::USUARIO_ID, ),
		BasePeer::TYPE_FIELDNAME => array ('id', 'tipocontribuinte_id', 'nome', 'endereco', 'num', 'compl', 'bairro', 'cidade_id', 'estado_id', 'cep', 'tel_res', 'tel_com', 'tel_cel', 'rg', 'cpf', 'email', 'dia_id', 'mes_id', 'ano_id', 'profissao_id', 'indicacao_id', 'ehcontribuinte', 'ativo', 'created_at', 'updated_at', 'usuario_id', ),
		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, )
	);

	
	private static $fieldKeys = array (
		BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'TipocontribuinteId' => 1, 'Nome' => 2, 'Endereco' => 3, 'Num' => 4, 'Compl' => 5, 'Bairro' => 6, 'CidadeId' => 7, 'EstadoId' => 8, 'Cep' => 9, 'TelRes' => 10, 'TelCom' => 11, 'TelCel' => 12, 'Rg' => 13, 'Cpf' => 14, 'Email' => 15, 'DiaId' => 16, 'MesId' => 17, 'AnoId' => 18, 'ProfissaoId' => 19, 'IndicacaoId' => 20, 'Ehcontribuinte' => 21, 'Ativo' => 22, 'CreatedAt' => 23, 'UpdatedAt' => 24, 'UsuarioId' => 25, ),
		BasePeer::TYPE_COLNAME => array (ContribuintesPeer::ID => 0, ContribuintesPeer::TIPOCONTRIBUINTE_ID => 1, ContribuintesPeer::NOME => 2, ContribuintesPeer::ENDERECO => 3, ContribuintesPeer::NUM => 4, ContribuintesPeer::COMPL => 5, ContribuintesPeer::BAIRRO => 6, ContribuintesPeer::CIDADE_ID => 7, ContribuintesPeer::ESTADO_ID => 8, ContribuintesPeer::CEP => 9, ContribuintesPeer::TEL_RES => 10, ContribuintesPeer::TEL_COM => 11, ContribuintesPeer::TEL_CEL => 12, ContribuintesPeer::RG => 13, ContribuintesPeer::CPF => 14, ContribuintesPeer::EMAIL => 15, ContribuintesPeer::DIA_ID => 16, ContribuintesPeer::MES_ID => 17, ContribuintesPeer::ANO_ID => 18, ContribuintesPeer::PROFISSAO_ID => 19, ContribuintesPeer::INDICACAO_ID => 20, ContribuintesPeer::EHCONTRIBUINTE => 21, ContribuintesPeer::ATIVO => 22, ContribuintesPeer::CREATED_AT => 23, ContribuintesPeer::UPDATED_AT => 24, ContribuintesPeer::USUARIO_ID => 25, ),
		BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'tipocontribuinte_id' => 1, 'nome' => 2, 'endereco' => 3, 'num' => 4, 'compl' => 5, 'bairro' => 6, 'cidade_id' => 7, 'estado_id' => 8, 'cep' => 9, 'tel_res' => 10, 'tel_com' => 11, 'tel_cel' => 12, 'rg' => 13, 'cpf' => 14, 'email' => 15, 'dia_id' => 16, 'mes_id' => 17, 'ano_id' => 18, 'profissao_id' => 19, 'indicacao_id' => 20, 'ehcontribuinte' => 21, 'ativo' => 22, 'created_at' => 23, 'updated_at' => 24, 'usuario_id' => 25, ),
		BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, )
	);

	
	public static function getMapBuilder()
	{
		include_once 'lib/model/map/ContribuintesMapBuilder.php';
		return BasePeer::getMapBuilder('lib.model.map.ContribuintesMapBuilder');
	}
	
	public static function getPhpNameMap()
	{
		if (self::$phpNameMap === null) {
			$map = ContribuintesPeer::getTableMap();
			$columns = $map->getColumns();
			$nameMap = array();
			foreach ($columns as $column) {
				$nameMap[$column->getPhpName()] = $column->getColumnName();
			}
			self::$phpNameMap = $nameMap;
		}
		return self::$phpNameMap;
	}
	
	static public function translateFieldName($name, $fromType, $toType)
	{
		$toNames = self::getFieldNames($toType);
		$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
		if ($key === null) {
			throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
		}
		return $toNames[$key];
	}

	

	static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
	{
		if (!array_key_exists($type, self::$fieldNames)) {
			throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
		}
		return self::$fieldNames[$type];
	}

	
	public static function alias($alias, $column)
	{
		return str_replace(ContribuintesPeer::TABLE_NAME.'.', $alias.'.', $column);
	}

	
	public static function addSelectColumns(Criteria $criteria)
	{

		$criteria->addSelectColumn(ContribuintesPeer::ID);

		$criteria->addSelectColumn(ContribuintesPeer::TIPOCONTRIBUINTE_ID);

		$criteria->addSelectColumn(ContribuintesPeer::NOME);

		$criteria->addSelectColumn(ContribuintesPeer::ENDERECO);

		$criteria->addSelectColumn(ContribuintesPeer::NUM);

		$criteria->addSelectColumn(ContribuintesPeer::COMPL);

		$criteria->addSelectColumn(ContribuintesPeer::BAIRRO);

		$criteria->addSelectColumn(ContribuintesPeer::CIDADE_ID);

		$criteria->addSelectColumn(ContribuintesPeer::ESTADO_ID);

		$criteria->addSelectColumn(ContribuintesPeer::CEP);

		$criteria->addSelectColumn(ContribuintesPeer::TEL_RES);

		$criteria->addSelectColumn(ContribuintesPeer::TEL_COM);

		$criteria->addSelectColumn(ContribuintesPeer::TEL_CEL);

		$criteria->addSelectColumn(ContribuintesPeer::RG);

		$criteria->addSelectColumn(ContribuintesPeer::CPF);

		$criteria->addSelectColumn(ContribuintesPeer::EMAIL);

		$criteria->addSelectColumn(ContribuintesPeer::DIA_ID);

		$criteria->addSelectColumn(ContribuintesPeer::MES_ID);

		$criteria->addSelectColumn(ContribuintesPeer::ANO_ID);

		$criteria->addSelectColumn(ContribuintesPeer::PROFISSAO_ID);

		$criteria->addSelectColumn(ContribuintesPeer::INDICACAO_ID);

		$criteria->addSelectColumn(ContribuintesPeer::EHCONTRIBUINTE);

		$criteria->addSelectColumn(ContribuintesPeer::ATIVO);

		$criteria->addSelectColumn(ContribuintesPeer::CREATED_AT);

		$criteria->addSelectColumn(ContribuintesPeer::UPDATED_AT);

		$criteria->addSelectColumn(ContribuintesPeer::USUARIO_ID);

	}

	const COUNT = 'COUNT(contribuintes.ID)';
	const COUNT_DISTINCT = 'COUNT(DISTINCT contribuintes.ID)';

	
	public static function doCount(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}
	
	public static function doSelectOne(Criteria $criteria, $con = null)
	{
		$critcopy = clone $criteria;
		$critcopy->setLimit(1);
		$objects = ContribuintesPeer::doSelect($critcopy, $con);
		if ($objects) {
			return $objects[0];
		}
		return null;
	}
	
	public static function doSelect(Criteria $criteria, $con = null)
	{
		return ContribuintesPeer::populateObjects(ContribuintesPeer::doSelectRS($criteria, $con));
	}
	
	public static function doSelectRS(Criteria $criteria, $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(self::DATABASE_NAME);
		}

		if (!$criteria->getSelectColumns()) {
			$criteria = clone $criteria;
			ContribuintesPeer::addSelectColumns($criteria);
		}

				$criteria->setDbName(self::DATABASE_NAME);

						return BasePeer::doSelect($criteria, $con);
	}
	
	public static function populateObjects(ResultSet $rs)
	{
		$results = array();
	
				$cls = ContribuintesPeer::getOMClass();
		$cls = Propel::import($cls);
				while($rs->next()) {
		
			$obj = new $cls();
			$obj->hydrate($rs);
			$results[] = $obj;
			
		}
		return $results;
	}

	
	public static function doCountJoinTipocontribuintes(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinCidades(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinEstados(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinDias(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinMess(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAnos(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinProfissaos(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinIndicacaos(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinUsuarios(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doSelectJoinTipocontribuintes(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		TipocontribuintesPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinCidades(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		CidadesPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = CidadesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getCidades(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinEstados(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		EstadosPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = EstadosPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getEstados(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinDias(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		DiasPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = DiasPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getDias(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinMess(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		MessPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = MessPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getMess(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAnos(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		AnosPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = AnosPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getAnos(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinProfissaos(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		ProfissaosPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = ProfissaosPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getProfissaos(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinIndicacaos(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		IndicacaosPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = IndicacaosPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getIndicacaos(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinUsuarios(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;
		UsuariosPeer::addSelectColumns($c);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);
		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = UsuariosPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol);

			$newObject = true;
			foreach($results as $temp_obj1) {
				$temp_obj2 = $temp_obj1->getUsuarios(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
										$temp_obj2->addContribuintes($obj1); 					break;
				}
			}
			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1); 			}
			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
	{
		$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doSelectJoinAll(Criteria $c, $con = null)
	{
		$c = clone $c;

				if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol11 = $startcol10 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);


					
			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2 = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}


					
			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3 = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}


					
			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4 = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}


					
			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5 = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getDias(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}


					
			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6 = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getMess(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}


					
			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7 = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getAnos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}


					
			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8 = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getProfissaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}


					
			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9 = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getIndicacaos(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}


					
			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj10 = new $cls();
			$obj10->hydrate($rs, $startcol10);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj10 = $temp_obj1->getUsuarios(); 				if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) {
					$newObject = false;
					$temp_obj10->addContribuintes($obj1); 					break;
				}
			}

			if ($newObject) {
				$obj10->initContribuintess();
				$obj10->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doCountJoinAllExceptTipocontribuintes(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptCidades(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptEstados(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptDias(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptMess(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptAnos(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptProfissaos(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptIndicacaos(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doCountJoinAllExceptUsuarios(Criteria $criteria, $distinct = false, $con = null)
	{
				$criteria = clone $criteria;

				$criteria->clearSelectColumns()->clearOrderByColumns();
		if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT_DISTINCT);
		} else {
			$criteria->addSelectColumn(ContribuintesPeer::COUNT);
		}

				foreach($criteria->getGroupByColumns() as $column)
		{
			$criteria->addSelectColumn($column);
		}

		$criteria->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$criteria->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$criteria->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$criteria->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$rs = ContribuintesPeer::doSelectRS($criteria, $con);
		if ($rs->next()) {
			return $rs->getInt(1);
		} else {
						return 0;
		}
	}


	
	public static function doSelectJoinAllExceptTipocontribuintes(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		CidadesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getCidades(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getEstados(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getDias(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getMess(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getAnos(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getProfissaos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptCidades(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getEstados(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getDias(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getMess(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getAnos(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getProfissaos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptEstados(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getDias(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getMess(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getAnos(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getProfissaos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptDias(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getMess(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getAnos(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getProfissaos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptMess(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + DiasPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getDias(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getAnos(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getProfissaos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptAnos(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + MessPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getDias(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getMess(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getProfissaos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptProfissaos(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + AnosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + IndicacaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getDias(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getMess(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getAnos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getIndicacaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptIndicacaos(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + ProfissaosPeer::NUM_COLUMNS;

		UsuariosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + UsuariosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::USUARIO_ID, UsuariosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getDias(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getMess(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getAnos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getProfissaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = UsuariosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getUsuarios(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}


	
	public static function doSelectJoinAllExceptUsuarios(Criteria $c, $con = null)
	{
		$c = clone $c;

								if ($c->getDbName() == Propel::getDefaultDB()) {
			$c->setDbName(self::DATABASE_NAME);
		}

		ContribuintesPeer::addSelectColumns($c);
		$startcol2 = (ContribuintesPeer::NUM_COLUMNS - ContribuintesPeer::NUM_LAZY_LOAD_COLUMNS) + 1;

		TipocontribuintesPeer::addSelectColumns($c);
		$startcol3 = $startcol2 + TipocontribuintesPeer::NUM_COLUMNS;

		CidadesPeer::addSelectColumns($c);
		$startcol4 = $startcol3 + CidadesPeer::NUM_COLUMNS;

		EstadosPeer::addSelectColumns($c);
		$startcol5 = $startcol4 + EstadosPeer::NUM_COLUMNS;

		DiasPeer::addSelectColumns($c);
		$startcol6 = $startcol5 + DiasPeer::NUM_COLUMNS;

		MessPeer::addSelectColumns($c);
		$startcol7 = $startcol6 + MessPeer::NUM_COLUMNS;

		AnosPeer::addSelectColumns($c);
		$startcol8 = $startcol7 + AnosPeer::NUM_COLUMNS;

		ProfissaosPeer::addSelectColumns($c);
		$startcol9 = $startcol8 + ProfissaosPeer::NUM_COLUMNS;

		IndicacaosPeer::addSelectColumns($c);
		$startcol10 = $startcol9 + IndicacaosPeer::NUM_COLUMNS;

		$c->addJoin(ContribuintesPeer::TIPOCONTRIBUINTE_ID, TipocontribuintesPeer::ID);

		$c->addJoin(ContribuintesPeer::CIDADE_ID, CidadesPeer::ID);

		$c->addJoin(ContribuintesPeer::ESTADO_ID, EstadosPeer::ID);

		$c->addJoin(ContribuintesPeer::DIA_ID, DiasPeer::ID);

		$c->addJoin(ContribuintesPeer::MES_ID, MessPeer::ID);

		$c->addJoin(ContribuintesPeer::ANO_ID, AnosPeer::ID);

		$c->addJoin(ContribuintesPeer::PROFISSAO_ID, ProfissaosPeer::ID);

		$c->addJoin(ContribuintesPeer::INDICACAO_ID, IndicacaosPeer::ID);


		$rs = BasePeer::doSelect($c, $con);
		$results = array();

		while($rs->next()) {

			$omClass = ContribuintesPeer::getOMClass();

			$cls = Propel::import($omClass);
			$obj1 = new $cls();
			$obj1->hydrate($rs);

			$omClass = TipocontribuintesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj2  = new $cls();
			$obj2->hydrate($rs, $startcol2);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj2 = $temp_obj1->getTipocontribuintes(); 				if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
					$newObject = false;
					$temp_obj2->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj2->initContribuintess();
				$obj2->addContribuintes($obj1);
			}

			$omClass = CidadesPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj3  = new $cls();
			$obj3->hydrate($rs, $startcol3);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj3 = $temp_obj1->getCidades(); 				if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
					$newObject = false;
					$temp_obj3->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj3->initContribuintess();
				$obj3->addContribuintes($obj1);
			}

			$omClass = EstadosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj4  = new $cls();
			$obj4->hydrate($rs, $startcol4);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj4 = $temp_obj1->getEstados(); 				if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
					$newObject = false;
					$temp_obj4->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj4->initContribuintess();
				$obj4->addContribuintes($obj1);
			}

			$omClass = DiasPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj5  = new $cls();
			$obj5->hydrate($rs, $startcol5);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj5 = $temp_obj1->getDias(); 				if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
					$newObject = false;
					$temp_obj5->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj5->initContribuintess();
				$obj5->addContribuintes($obj1);
			}

			$omClass = MessPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj6  = new $cls();
			$obj6->hydrate($rs, $startcol6);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj6 = $temp_obj1->getMess(); 				if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
					$newObject = false;
					$temp_obj6->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj6->initContribuintess();
				$obj6->addContribuintes($obj1);
			}

			$omClass = AnosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj7  = new $cls();
			$obj7->hydrate($rs, $startcol7);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj7 = $temp_obj1->getAnos(); 				if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
					$newObject = false;
					$temp_obj7->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj7->initContribuintess();
				$obj7->addContribuintes($obj1);
			}

			$omClass = ProfissaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj8  = new $cls();
			$obj8->hydrate($rs, $startcol8);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj8 = $temp_obj1->getProfissaos(); 				if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
					$newObject = false;
					$temp_obj8->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj8->initContribuintess();
				$obj8->addContribuintes($obj1);
			}

			$omClass = IndicacaosPeer::getOMClass();


			$cls = Propel::import($omClass);
			$obj9  = new $cls();
			$obj9->hydrate($rs, $startcol9);

			$newObject = true;
			for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
				$temp_obj1 = $results[$j];
				$temp_obj9 = $temp_obj1->getIndicacaos(); 				if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
					$newObject = false;
					$temp_obj9->addContribuintes($obj1);
					break;
				}
			}

			if ($newObject) {
				$obj9->initContribuintess();
				$obj9->addContribuintes($obj1);
			}

			$results[] = $obj1;
		}
		return $results;
	}

	
	public static function getTableMap()
	{
		return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
	}

	
	public static function getOMClass()
	{
		return ContribuintesPeer::CLASS_DEFAULT;
	}

	
	public static function doInsert($values, $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(self::DATABASE_NAME);
		}

		if ($values instanceof Criteria) {
			$criteria = clone $values; 		} else {
			$criteria = $values->buildCriteria(); 		}

		$criteria->remove(ContribuintesPeer::ID); 

				$criteria->setDbName(self::DATABASE_NAME);

		try {
									$con->begin();
			$pk = BasePeer::doInsert($criteria, $con);
			$con->commit();
		} catch(PropelException $e) {
			$con->rollback();
			throw $e;
		}

		return $pk;
	}

	
	public static function doUpdate($values, $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(self::DATABASE_NAME);
		}

		$selectCriteria = new Criteria(self::DATABASE_NAME);

		if ($values instanceof Criteria) {
			$criteria = clone $values; 
			$comparison = $criteria->getComparison(ContribuintesPeer::ID);
			$selectCriteria->add(ContribuintesPeer::ID, $criteria->remove(ContribuintesPeer::ID), $comparison);

		} else { 			$criteria = $values->buildCriteria(); 			$selectCriteria = $values->buildPkeyCriteria(); 		}

				$criteria->setDbName(self::DATABASE_NAME);

		return BasePeer::doUpdate($selectCriteria, $criteria, $con);
	}

	
	public static function doDeleteAll($con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(self::DATABASE_NAME);
		}
		$affectedRows = 0; 		try {
									$con->begin();
			$affectedRows += BasePeer::doDeleteAll(ContribuintesPeer::TABLE_NAME, $con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	 public static function doDelete($values, $con = null)
	 {
		if ($con === null) {
			$con = Propel::getConnection(ContribuintesPeer::DATABASE_NAME);
		}

		if ($values instanceof Criteria) {
			$criteria = clone $values; 		} elseif ($values instanceof Contribuintes) {

			$criteria = $values->buildPkeyCriteria();
		} else {
						$criteria = new Criteria(self::DATABASE_NAME);
			$criteria->add(ContribuintesPeer::ID, (array) $values, Criteria::IN);
		}

				$criteria->setDbName(self::DATABASE_NAME);

		$affectedRows = 0; 
		try {
									$con->begin();
			
			$affectedRows += BasePeer::doDelete($criteria, $con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public static function doValidate(Contribuintes $obj, $cols = null)
	{
		$columns = array();

		if ($cols) {
			$dbMap = Propel::getDatabaseMap(ContribuintesPeer::DATABASE_NAME);
			$tableMap = $dbMap->getTable(ContribuintesPeer::TABLE_NAME);

			if (! is_array($cols)) {
				$cols = array($cols);
			}

			foreach($cols as $colName) {
				if ($tableMap->containsColumn($colName)) {
					$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
					$columns[$colName] = $obj->$get();
				}
			}
		} else {

		}

		$res =  BasePeer::doValidate(ContribuintesPeer::DATABASE_NAME, ContribuintesPeer::TABLE_NAME, $columns);
    if ($res !== true) {
        $request = sfContext::getInstance()->getRequest();
        foreach ($res as $failed) {
            $col = ContribuintesPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME);
            $request->setError($col, $failed->getMessage());
        }
    }

    return $res;
	}

	
	public static function retrieveByPK($pk, $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(self::DATABASE_NAME);
		}

		$criteria = new Criteria(ContribuintesPeer::DATABASE_NAME);

		$criteria->add(ContribuintesPeer::ID, $pk);


		$v = ContribuintesPeer::doSelect($criteria, $con);

		return !empty($v) > 0 ? $v[0] : null;
	}

	
	public static function retrieveByPKs($pks, $con = null)
	{
		if ($con === null) {
			$con = Propel::getConnection(self::DATABASE_NAME);
		}

		$objs = null;
		if (empty($pks)) {
			$objs = array();
		} else {
			$criteria = new Criteria();
			$criteria->add(ContribuintesPeer::ID, $pks, Criteria::IN);
			$objs = ContribuintesPeer::doSelect($criteria, $con);
		}
		return $objs;
	}

} 
if (Propel::isInit()) {
			try {
		BaseContribuintesPeer::getMapBuilder();
	} catch (Exception $e) {
		Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
	}
} else {
			require_once 'lib/model/map/ContribuintesMapBuilder.php';
	Propel::registerMapBuilder('lib.model.map.ContribuintesMapBuilder');
}
